'''Contains the layout for the Dell claim creator GUI.'''
import PySimpleGUI as sg
from warranty_manager.claim.common import (
    CANCEL_COLOR,
    TEXT_LABEL_SIZE,
    TEXT_INPUT_SIZE
)
from warranty_manager.claim.dell.common import (
    get_credentials_layout, get_add_parts_notes_layout
)


sg.theme('Reddit')

layout = [
    *get_credentials_layout(sandbox=True),
    [
        sg.T('Dispatch Code', size=TEXT_LABEL_SIZE),
        sg.I(key='-CODE-', size=TEXT_INPUT_SIZE),
    ],
    *get_add_parts_notes_layout(),
    [
        sg.Button(
            'Resubmit',
            button_color=('black', '#8cc4e9'),
            tooltip='Resubmits a denied self-dispatch support request'
        ),
        sg.Button(
            'Load',
            key='-LOAD_PARTS-',
            button_color=('white', '#8a2be2'),
            tooltip="Loads the dictionary of part descriptions and numbers"
            " from the specified JSON file"
        ),
        sg.Button(
            'Get Status',
            button_color=('black', '#daa520'),
            tooltip='Gets the status for the provided dispatch code'
        ),
        sg.Button(
            'Bulk Inquiry',
            button_color=('black', '#7fffd4'),
            tooltip='Creates an Excel workbook with all the dispatches that were '
            'created from the chosen date'
        ),
        sg.Cancel(button_color=CANCEL_COLOR)
    ]
]
